<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('活动配置列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" class="table text-nowrap"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "ActActive/ActActive";

        $(function() {
            var options = {
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                clickToSelect:true,
                url: prefix + "/getLists",
                modalName: "活动配置",
                columns: [{
                    radio: true
                },
                {
                    field: 'POSNO',
                    title: 'POS编号',
                },
                {
                    field: 'MACHINE_NUM',
                    title: 'SN编号'
                },
                {
                    field: 'ACT_NAME',
                    title: '活动名称'
                },{
                    field: 'ACTIVATE_DATE',
                    title: '激活时间'
                 },{
                        field: 'ACHIEVEMENT_DATE',
                        title: '时间(已达标)'
                    },{
                        field: 'MER_NAME',
                        title: '商户名称'
                    },{
                        field: 'SCREEN_NAME',
                        title: '结算人'
                    },{
                        field: 'MERNO',
                        title: '商户编号'
                    }
                ]
            };
            $.table.init(options);
        });

        function submitHandler(index, layero) {
            var rows = $.table.selectFirstColumns();
            if (rows.length == 0) {
                $.modal.alertWarning("请选择一条记录");
                return;
            }
            $.modal.close();
            // 父页面的变量

            parent.$('#actId').val($.table.selectColumns("actId"));
            parent.$('#actName').val($.table.selectColumns("actName"));

        }
    </script>
</body>
</html>